package landun.action;

import java.util.Map;


import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import landun.pojo.SysEmployee;

public class BaseAction<T> extends ActionSupport {
	protected Integer pageNo = 1;
	protected Integer pageSize = 5;

	protected Map<String, Object> getSession() {
		ActionContext actionContext = ActionContext.getContext();
		return actionContext.getSession();
	}

	protected SysEmployee getLoginEmployee() {
		return (SysEmployee) this.getSession().get("user");
	}
//
//	public String getPositionForShort() {
//		switch (this.getLoginEmployee().getSysPosition().getNameCn()) {
//		case Constants.POSITION_CASHIER:
//			return Constants.POSITION_CASHIER_EN;
//		case Constants.POSITION_FM:
//			return Constants.POSITION_FM_EN;
//		case Constants.POSITION_GM:
//			return Constants.POSITION_GM_EN;
//		default:
//			return Constants.POSITION_STAFF_EN;
//		}
//	}

	public Integer getPageNo() {
		return pageNo;
	}

	public void setPageNo(Integer pageNo) {
		this.pageNo = pageNo;
	}

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}


}
